package com.wxd.modules.function.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wxd.annotation.ExcelColumn;
import com.wxd.validator.group.AddGroup;
import com.wxd.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.*;

/**
 * 员工基表
 */

@Data
@TableName("base_emp")
public class EmpEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 员工ID
     */
    @TableId(type = IdType.ID_WORKER)
    @ExcelColumn(value = "员工ID", col = 1)
    private Long empId;
    /**
     * 员工名
     */
    @NotBlank(message = "员工名不能为空",groups = {AddGroup.class, UpdateGroup.class})
    @ExcelColumn(value = "员工姓名", col= 2)
    private String empName;
    /**
     * 部门ID
     */
    @NotNull(message = "部门不能为空",groups = {AddGroup.class,UpdateGroup.class})
    @ExcelColumn(value = "部门ID", col = 3)
    public Long deptId;
    /**
     * 部门名称
     */
    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    private String deptName;
    /**
     * 身份证号
     */
    @NotNull(message = "身份证号不能为空",groups = {AddGroup.class, UpdateGroup.class})
    @ExcelColumn(value = "身份证号", col = 4)
    private Long idCard;
    /**
     * 性别 1:男 2：女
     */
    @ExcelColumn(value = "性别", col = 5)
    private Integer gender;

    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    private String genderStr;
    /**
     * 出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "出生日期", col = 6)
    private Date birthDate;
    /**
     * 籍贯
     */
    @ExcelColumn(value = "籍贯", col= 7)
    private String nativePlace;
    /**
     * 学历
     */
    @ExcelColumn(value = "学历", col = 8)
    private String education;
    /**
     * 专业
     */
    @ExcelColumn(value = "专业", col = 9 )
    private String major;
    /**
     * 毕业学校
     */
    @ExcelColumn(value = "毕业学校", col = 10)
    private String graduateSchool;
    /**
     * 政治面貌
     */
    @ExcelColumn(value = "政治面貌", col = 11)
    private String politicalBackground;
    /**
     * 参加工作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "参加工作时间", col = 12)
    private Date joinWorkTime;
    /**
     * 入本单位日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "入本单位日期", col = 13)
    private Date joinDeptTime;
    /**
     * 手机号
     */
    @ExcelColumn(value = "工作电话", col = 14)
    private String mobile;
    /**
     * 住址
     */
    @ExcelColumn(value = "住址", col = 15)
    @NotBlank(message = "地址不能为空",groups = {AddGroup.class, UpdateGroup.class})
    private String addr;
    /**
     * 状态  0：在岗   1：死亡 2：退休 3：离职  4：调出，5不在岗
     */
    private Integer status;
    /**
     *
     */
    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    private String statusStr;
    /**
     * 新进类型
     */
    private Integer  joinType;

    /**
     *
     */
    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    private String  joinTypeStr;

    /**
     * 如果不在岗，不在岗原因，不在岗时间
     */
    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    private String  causeStr;

    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date changeDate;
    /**
     * 备注
     */
    @ExcelColumn(value = "备注", col = 16)
    private String remarks;
    /**
     * 职名（务）
     */
    @ExcelColumn(value = "职名（务）", col = 17)
    private String office;

   /*新增字段*/
    /**
     * 用工性质
     */
    @ExcelColumn(value = "用工性质", col = 18)
    private String employMode;

    /**
     * 医保号
     */
    @ExcelColumn(value = "医保号", col = 20)
     private Long medicalId;

    /**
     * 档案号
     */
    @ExcelColumn(value = "档案号", col = 21)
    private Long archivesId;
    /**
     *工作证号
     */
    @ExcelColumn(value = "工作证号", col = 22)
    private Long workId;
    /**
     *社保号
     */
    @ExcelColumn(value = "社保号", col = 23)
    private Long societySafeguardId;

    /**
     * 技能等级
     */
    @ExcelColumn(value = "技能等级", col = 24)
    private String skillGrade;
    /**
     *技能工种
     */
    @ExcelColumn(value = "技能工种", col = 25)
    private String  skillKid;
    /**
     * 技能鉴定通过日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "技能鉴定通过日期", col = 26)
    private Date skillPassDate;

    /**
     *合同开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "合同开始日期", col = 27)
    private Date contractStartDate;

    /**
     * 合同结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "合同结束时间", col = 28)
    private Date contractEndDate;
    /**
     *解除合同日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelColumn(value = "解除合同日期", col = 29)
    private Date contractRelieveDate;
    /**
     *是否军人
     */
    @ExcelColumn(value = "是否军人", col = 30)
    private String isSolider;

    /**
     * 是否干部
     */
    @ExcelColumn(value = "是否干部", col = 31)
    private String isLeader;

    /**
     * 是否实习
     */
    @ExcelColumn(value = "是否实习", col = 32)
    private String isInternship;
    /**
     *民族
     */
    @ExcelColumn(value = "民族", col = 33)
   private String nationality;
    /**
     * 年龄
     */
    @ExcelColumn(value = "年龄", col = 34)
    private Integer age;

}
